<?php

/**
 * Abstraction pour les classes prenant en charge les elements de type [helper]
 *
 * @category   McCube
 * @package    Template.Parser
 * @author     Leiha Sellier <leiha.sellier@gmail.com>
 * @license    http://creativecommons.org/licenses/by/3.0/  CC BY 3.0
 * @link       http://code.google.com/p/mechanics-cubes/
 */
abstract class McCube_Template_Parser_Element_Helper_Abstract
    extends McCube_Template_Parser_Element_Variable_Abstract{

    public function execution($helper, $shelper='', $inTag='', $filters=''){
        return $this->_addExecListener(
             $this->build($helper, $shelper, $inTag, $filters)
        );
    }

    public function buildPhpTag($string){
        if(!$this->_phpTags)
            return $string;

        return '<?php echo '.$string.'; ?>';
    }
}